zifuchuan=input()
zifu=input()
count=0
for i in zifuchuan:
    if i==zifu:
        continue
    else:
        count+=1
print(count,end="")
